package com.Threecharacters.inherit_.ExtendDetail;

public class Base extends Base1 {

    public int n1 = 100;//公共类
    protected int n2 = 200;//受保护类
    int n3 = 300;//默认类
    private int n4 = 400;//私有类

    public Base() {
        System.out.println("Base Constructor");
    }

    public Base(int n1) {
        System.out.println("Base(int n1)构造器被调用");
    }

    public Base(int n1, int n2) {
        System.out.println("Base(int n1, int n2)构造器被调用");
    }

    public void test100() {
        System.out.println(" test100");
    }

    protected void test200() {
        System.out.println(" test200");
    }

    void test300() {
        System.out.println(" test300");
    }

    private void test400() {
        System.out.println(" test400");
    }

    public void f1() {//公共方法调用私有的属性和方法
        test400();
        System.out.println(n4);
    }


}
